﻿using lingopen.Application;
using lingopen.AutoMapper;
using lingopen.Entity;
using lingopen.Entity.System;
using lingopen.Entity.WF;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace lingopen.Application.WF
{
    public class AddOrUpdateDiagramInput : ValidationModel
    {
        [RequiredAttribute(ErrorMessage = "流程代码不能为空")]
        public string Code { get; set; }
        [RequiredAttribute(ErrorMessage = "流程名称不能为空")]
        public string Name { get; set; }
        [RequiredAttribute(ErrorMessage = "流程版本不能为空")]
        public double? Version { get; set; } 
        public string JSON { get; set; }
        public bool IsEnabled { get; set; }
        public string Description { get; set; }
    }

    [MapToType(typeof(WF_Diagram))]
    public class AddDiagramInput : AddOrUpdateDiagramInput
    {
        public string CreateUserId { get; set; }
    }

    [MapToType(typeof(WF_Diagram))]
    public class UpdateDiagramInput : AddOrUpdateDiagramInput
    {
        [RequiredAttribute(ErrorMessage = "{0}不能为空")]
        public string Id { get; set; }
    }
}
